package com.abc.simplefactory;

public class CarFactory {
	
	public ICarAble create(String className) {
		switch (className) {
		case "bmw":
			return new BmwCar();
		case "jeep":
			return new JeepCar();
		default:
			throw new RuntimeException("className:["+className+"]类型不可识别，没有匹配到可实例化的对象！");
		}
	}
}
